package com.web.cms.ad.message;

import com.blue.core.dict.AdvType;
import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 广告位置请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年11月13日
 */
 public class AdvPosRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotNull(groups = { SaveModel.class }, message = "网站编号不能为空")
	private Integer webId; // 网站编号
	@NotBlank(groups = { SaveModel.class }, message = "代码不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "代码长度[0-50]")
	private String code; // 代码
	@NotBlank(groups = { SaveModel.class }, message = "名称不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "名称长度[0-50]")
	private String name; // 名称
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "描述长度[0-500]")
	private String descp; // 描述
	@NotNull(groups = { SaveModel.class }, message = "类型不能为空")
	private AdvType type; // 类型：1图片，2文字
	private State state; // 状态：0正常，1作废
	
	public AdvPosRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getWebId()
	{
		return this.webId;
	}
	
	public void setWebId(Integer webId)
	{
		this.webId = webId;
	}
	
	public String getCode()
	{
		return this.code;
	}
	
	public void setCode(String code)
	{
		this.code = code;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getDescp()
	{
		return this.descp;
	}
	
	public void setDescp(String descp)
	{
		this.descp = descp;
	}

	public AdvType getType()
	{
		return type;
	}

	public void setType(AdvType type)
	{
		this.type = type;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}

}
